import { DialogConfig } from '@/components/mm-dialog/type'

export const dialogConfig: DialogConfig = {
  width: 620,
  showLabel: true,
  labelWidth: 95,
  layout: [
    {
      gutter: 20,
      formItems: [
        {
          label: '运营商',
          prop: 'isp_id',
          type: 'select',
          placeholder: '请选择运营商',
          optionsGetter: 'icafe/ispOptions',
          rules: [{ required: true, message: '必填项不能为空', trigger: 'change' }]
        },
        {
          label: '带宽(Mbps)',
          prop: 'bandwidth',
          type: 'number',
          placeholder: '请输入带宽',
          default: 0,
          bind: {
            min: 0,
            controlsPosition: 'right'
          },
          rules: [{ required: true, message: '必填项不能为空', trigger: 'blur' }]
        }
      ]
    },
    {
      gutter: 20,
      formItems: [
        {
          label: '宽带账号',
          prop: 'account',
          type: 'input',
          placeholder: '请输入宽带账号',
          rules: [{ required: true, message: '必填项不能为空', trigger: 'blur' }]
        },
        {
          label: '宽带密码',
          prop: 'password',
          type: 'input',
          placeholder: '请输入宽带密码',
          rules: [{ required: true, message: '必填项不能为空', trigger: 'blur' }]
        }
      ]
    },
    {
      formItems: [
        {
          label: '备注',
          prop: 'remarks',
          type: 'textarea',
          placeholder: '请输入备注',
          bind: {
            rows: 3
          }
        }
      ]
    }
  ]
}
